<script setup lang="ts">
    import {ref} from 'vue'
    import Child from './Child.vue'
    //父组件的数据=>传给子组件
    let dog = ref('泰迪')
    let age = ref(18)

    //复杂一点的是子传父,属性值是函数
    let jiangzhuang = ref('无')

    //特点为子组件准备的 - 由子组件来调用的
    function getJaingZhuang(v:string){
        jiangzhuang.value = v
    }
</script>
<template>
    <h1>Props-父组件</h1>
    <h2>子传过来的数据是:{{jiangzhuang}}</h2>
    <hr>
    <Child :dogData="dog" :ageData="age" :sendFather="getJaingZhuang"/>
</template>
<style scoped>
   
</style>